package com.example.contact.viewmodel

import androidx.compose.runtime.mutableStateOf
import com.example.contact.R
import com.example.contact.model.Contact
import com.example.featuresdk.model.User

class ContactDetailState {
    /**
     * the basic user information
     */
    var user = User(0,"",R.drawable.ic_head_sender)

    /**
     * the contact information of this user
     */
    var contact: Contact? = null

    var username = mutableStateOf("")
//        private set
//        get() {
//           if(contact == null || contact!!.name.isNullOrEmpty()){
//               return user.nickname
//           }
//
//           return contact!!.name!!
//       }

    var showNickname: Boolean = false
        private set
        get() {
        if(contact == null || contact!!.name.isNullOrEmpty()){
            return false
        }

        return true
    }

    val hasChatAccess = mutableStateOf(true)
}